import request from "@/utils/request";

// 查询供应商列表
export function listMaterialSupplier(query) {
  return request({
    url: "/ma/materialSupplier/list",
    method: "get",
    params: query
  });
}

// 根据获取项目-标段-站点树
export function queryProjectTree(query) {
  return request({
    url: "/ma/materialSupplier/projectTreeList",
    method: "get",
    params: query
  });
}

// 查询供应商详细
export function getMaterialSupplier(id) {
  return request({
    url: "/ma/materialSupplier/" + id,
    method: "get"
  });
}

// 新增供应商
export function addMaterialSupplier(data) {
  return request({
    url: "/ma/materialSupplier",
    method: "post",
    data: data
  });
}

// 修改供应商
export function updateMaterialSupplier(data) {
  return request({
    url: "/ma/materialSupplier",
    method: "put",
    data: data
  });
}

// 删除供应商
export function delMaterialSupplier(id) {
  return request({
    url: "/ma/materialSupplier/" + id,
    method: "delete"
  });
}
